package day_803;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Iterator;
import java.util.List;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;




public class StudentDome extends JFrame {
	//private StudentTableModel studentTableModel;
	private JTable table;
	//private List<Student> list;

	
	
	public void init(){
		JFrame jFrame=new JFrame();
		JPanel jPanel=new JPanel();
		jFrame.add(jPanel);
		//
		jPanel.setLayout(new GridLayout(3, 1));
		
		//第一行 
		JPanel diyihang=new JPanel();
		diyihang.setLayout(new FlowLayout(FlowLayout.CENTER, 20, 10));
		
		JLabel jLabel=new JLabel("请输入姓名");
		JTextField jTextField=new JTextField(10);
		JButton jButton=new JButton("搜索");
		diyihang.add(jLabel);
		diyihang.add(jTextField);
		diyihang .add(jButton);
		
		//第二行 写表格
		JPanel kong=new JPanel();
		
		
		//第三行 三个按钮
		//新增
		JPanel disanhang =new JPanel();
		disanhang.setLayout(new FlowLayout(FlowLayout.CENTER,80,10));
		JButton zengjia=new JButton("新增");
		zengjia.setPreferredSize(new Dimension(80, 30));
		
		//查询
		JButton chaxun=new JButton("查询");
		chaxun .setPreferredSize(new Dimension(80, 30));
		
		//删除
		JButton shanchu=new JButton("删除");
		shanchu.setPreferredSize(new Dimension(80, 30));
		//添加按钮
		disanhang.add(zengjia );
		disanhang.add(chaxun);
		disanhang.add(shanchu );
		
		jPanel.add(diyihang );
		jPanel.add(kong);
		jPanel.add(disanhang);
		
//		JPanel bottomPanel = new JPanel();
//		bottomPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 80, 10));
//		// addButton
//		JButton addButton = new JButton("新增");
//		addButton.setPreferredSize(new Dimension(80, 30));
//		bottomPanel.add(addButton);
//		// updateButton
//		JButton updateButton = new JButton("修改");
//		updateButton.setPreferredSize(new Dimension(80, 30));
//		bottomPanel.add(updateButton);
//		// deleteButton
//		JButton deleteButton = new JButton("删除");
//		deleteButton.setPreferredSize(new Dimension(80, 30));
//		bottomPanel.add(deleteButton);
//
//		mainPanel.add(topPanel);
//		mainPanel.add(centerPanel);
//		mainPanel.add(bottomPanel);
		
		
		
		
		
		
		
		
		
		//
		jFrame.setVisible(true);
		jFrame.setDefaultCloseOperation(jFrame.EXIT_ON_CLOSE);
		jFrame.setSize(700, 500);
		
		
	}
	

}
